package com.yisu.auction.api.core.mapper;

import com.yisu.auction.ewf.entity.UserToken;
import org.apache.ibatis.annotations.Param;

public interface UserTokenMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserToken record);

    int insertSelective(UserToken record);

    UserToken selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(UserToken record);

    int updateByPrimaryKey(UserToken record);

    /**
     * 作者：赵杰
     * 业务：通过用户token获取用户令牌信息
     * @param token 令牌号
     * @return
     */
    UserToken getUserTokenByToken(@Param("token") String token);

    /**
     * 作者：赵杰
     * 业务：通过MemberId,获取用户令牌信息
     * @param memberId 会员ID
     * @return
     */
    UserToken getUserTokenByMemberId(@Param("memberId") long memberId);
}